package com.heima.wemedia.controller;

import com.heima.common.dtos.ResponseResult;
import com.heima.model.media.dtos.WmUserLoginDto;
import com.heima.wemedia.service.WmUserService;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@Slf4j
public class LoginController {

    @Autowired
    private WmUserService wmUserService;

    @PostMapping("/login/in")
    public ResponseResult<Map<String,Object>> login(@RequestBody WmUserLoginDto dto){

        return ResponseResult.ok(wmUserService.login(dto));
    }


}
